//1.导包,找到Scanner这个类在哪.写在类定义的上方
import java.util.Scanner;

public class scannerdemo1{
	public static void main(String[] args){
		//2.创建对象
		Scanner sc = new Scanner(System.in);
		
		System.out.println("请输入数据:");
		//3.接收数据
		//变量i记录了键盘录入的数据
		int i = sc.nextInt();
		
		System.out.println(i);
	}
}